import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
import MainLayout from '../views/main/index.vue'
import Settings from '../views/settings/index.vue'
import Home from '../views/home/index.vue'
import About from '../views/about/index.vue'

const routes: RouteRecordRaw[] = [
  {
    path: '/',
    component: MainLayout,
    children: [
      {
        path: '',
        name: 'Home',
        component: Home
      },
      {
        path: 'settings',
        name: 'Settings',
        component: Settings
      },
      {
        path: 'about',
        name: 'About',
        component: About
      }
    ]
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
